package edu.cicese.alz.reports;

import java.awt.Graphics;
import java.awt.Graphics2D;

/**
 * Created by: Eduardo Quintana Contreras
 * Date: 9/08/12
 * Time: 04:56 PM
 */
public class BlockGPSPreview extends BlockPreview {

	public BlockGPSPreview() {
		gpsValues = new int[height / 30][width / 5];
		setGPSValues();
	}

	@Override
	public void paintComponent(Graphics g) {
		if (gpsValues != null) {
			Graphics2D g2 = (Graphics2D) g;

			for (int y = 0; y < height / 30; y++) {
				for (int x = 0; x < width / 5; x++) {
					g2.setColor(gpsColors[gpsValues[y][x]]);
					g2.fillRect(x * 5, y * 30, 5, 30);
				}
			}
		}
	}
}
